package com.yjian.dao.mapper;

import com.yjian.dao.bean.Member;
import com.yjian.dao.provider.MemberProvider;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * Created by xuxiaobao on 2017/9/27.
 */
@Mapper
public interface MemberMapper {

    @SelectProvider(type = MemberProvider.class, method = "getMemberListByUid")
    List<Member> getMemberListByUid(Member member);

    @SelectProvider(type = MemberProvider.class, method = "getMemberByMid")
    Member getMemberByMid(Member member);

    @InsertProvider(type = MemberProvider.class, method = "saveMember")
    int saveMember(Member member);

    @UpdateProvider(type = MemberProvider.class, method = "updateMemberByMid")
    int updateMemberByMid(Member member);

    @SelectProvider(type = MemberProvider.class, method = "isExistMemberAndUser")
    int isExistMemberAndUser(Member member);

    @SelectProvider(type = MemberProvider.class, method = "getMemberByPhone")
    List<Member> getMemberByPhone(Member member);

    @SelectProvider(type = MemberProvider.class, method = "getMemberTotalByCondition")
    int getMemberTotalByCondition(Member member);

    @SelectProvider(type = MemberProvider.class, method = "getMemberPageByCondition")
    List<Member> getMemberPageByCondition(Member member);

    @SelectProvider(type = MemberProvider.class, method = "isExistMemberByPhone")
    int isExistMemberByPhone(Member member);

    @SelectProvider(type = MemberProvider.class, method = "selectExecute")
    Map selectExecute(Map<String, Object> map);
}
